""" 官方：两张hash表
python set 去重 zip合并

 """
def isIsomorphic(s: str, t: str) -> bool:
    # func = {}
    # for i in range(len(s)):
    #     key = s[i]
    #     val = t[i]
    #     if key in func:
    #         func[key] != val
    #         return False

    #     func[key] = val
    # return True
    return len(set(s)) == len(set(t)) == len(set(zip(s, t)))

print(isIsomorphic("egg", "add"))